package com.itheima.controller;

import com.itheima.pojo.GoodsVo;
import com.itheima.service.SkuService;
import com.itheima.support.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/good")
public class SkuController {

    @Autowired
    private SkuService skuService;

    @PostMapping("/search")
    public Result findAll(@RequestBody GoodsVo goodsVo){
        return Result.build(skuService.findAll(goodsVo));
    }
}
